/*
 * @Descripttion: 
 * @version: 1.0
 * @Author: Sam
 * @Date: 2022-04-23 12:22:19
 * @LastEditors: Sam
 * @LastEditTime: 2022-07-27 15:38:40
 */
import request from '@/utils/request'

/**
 * 
 * @param {登录} data 
 * @returns 
 */
export function login(data) {
  return request({
    url: '/admin/login',
    method: 'post',
    data
  })
}

/**
 * 
 * @returns 获取用户信息
 */
export function getInfo() {
  return request({
    url: '/admin/login/info',
    method: 'get'
  })
}

/**
 * 
 * @returns 验证码
 */
export function getCaptcha() {
  return request({
    url: '/admin/login/captcha',
    method: 'get'
  })
}

/**
 * 
 * @returns 退出登录
 */
export function logout() {
  return request({
    url: `/admin/login/logout`,
    method: 'post'
  })
}
